package clh;

import static org.junit.Assert.*;
import org.junit.Test;

/**
 * Tests that Chuan moves in the correct direction based on the number
 * of times it hit a wall.
 * 
 * @author Chuan Lun Hung
 * 
 */
public class TestChuanHitWall {

  /**
   * Tests that Chuan moves in the correct direction based on the number
   * of times it hit a wall.
   */
  @Test
  public void testHitWall() {
    // the parameter in moveDistance is assumed to be the number
    // of times that the robot hit a wall
    assertSame("Check hit wall once", (int)Chuan.moveDistance(1), -80);
    assertSame("Check hit wall twice", (int)Chuan.moveDistance(2), 80);
    assertSame("Check hit wall 1000 times", (int)Chuan.moveDistance(1000), 80);
  }
}
